package com.shop.admin.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shop.admin.dao.RankedPrizeDao;
import com.shop.admin.entity.RankedPrize;
import com.shop.admin.service.RankedPrizeService;
import com.shop.admin.utils.PageUtils;
import com.shop.admin.utils.Query;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class RankedPrizeServiceImpl extends ServiceImpl<RankedPrizeDao, RankedPrize> implements RankedPrizeService {
    @Override
    public PageUtils rankedPrizeQueryPage(Map<String, Object> params) {
        IPage<RankedPrize> page = this.page(
                new Query<RankedPrize>().getPage(params),
                new QueryWrapper<RankedPrize>()
        );
        return new PageUtils(page);
    }

    @Override
    public void removeRankedPrizeByIds(List<Long> asList) {
        this.baseMapper.deleteBatchIds(asList);
    }

}
